<template>
  <div class="Subunit-box" :class="{ 'Subunit-box-two': props.ModuleId == 16 }">
    <component :is="getchild" :info="info" />
    <!-- <Subunit2Child1 v-if="props.ModuleId == 14" />
    <Subunit2Child2 v-else-if="props.ModuleId == 15" />
    <Subunit2Child3 v-else-if="props.ModuleId == 16" />
    <Subunit2Child4 v-else-if="props.ModuleId == 17" /> -->
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue';
import { useProjectStore } from '@/store';
import Subunit2Child1 from './Subunit2Child1.vue';
import Subunit2Child3 from './Subunit2Child3.vue';
import Subunit2Child2 from './Subunit2Child2.vue';

const store = useProjectStore();
const props = defineProps({
  ModuleId: {
    type: Number,
  },
  info: {
    type: Object,
  },
});
const getchild = computed(() => {
  switch (props.ModuleId) {
    case 14:
      return Subunit2Child1;
      break;
    case 15:
      return Subunit2Child3;
      break;
    case 16:
      return Subunit2Child2;
      break;
   
  }
});
</script>

<style lang="less" scoped>
@import './index.less';
.Subunit-box-two {
  width: 100%;
}
</style>
